package com.gxuwz.business.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gxuwz.business.dao.impl.RecipeDAO;
import com.gxuwz.business.entity.Recipe;
import com.gxuwz.business.service.IRecipeService;
import com.gxuwz.util.Pager;

@Service("recipeService")
public class RecipeServiceImpl implements IRecipeService {
	
	@Autowired
	private RecipeDAO recipeDAO;

	@Override
	public boolean add(Recipe recipe) {
		// TODO Auto-generated method stub
		return recipeDAO.add(recipe);
	}

	@Override
	public boolean update(Recipe recipe) {
		return recipeDAO.update(recipe);
	}

	@Override
	public boolean delete(Recipe recipe) {
		// TODO Auto-generated method stub
		return false;
	}
	
	

	@Override
	public Recipe findById(String recipeId) {
		return recipeDAO.findById(recipeId);
	}

	@Override
	public Pager<Recipe> getByPager(Integer page, Integer limit) {
		return recipeDAO.getByPager(page, limit);
	}

	@Override
	public List<String> getAllId() {
		return recipeDAO.getAllId();
	}

	@Override
	public List<Recipe> getAll(Class<Recipe> clazz) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Recipe> getAllByTreatId(String treatId) {
		return recipeDAO.getAllByTreatId(treatId);
	}

	@Override
	public List<String> getByTreatId(String treatId) {
		return recipeDAO.getByTreatId(treatId);
	}




}
